/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metro.jme.lottery.business;

import metro.jme.lottery.exceptions.InvalidFavSetFormatException;

/**
 *
 * @author pierre
 */
public class FavSetHandler {
	
	/**
	 * 
	 */
	private int[] m_favouriteList;
	
	/**
	 * 
	 */
	private static final int SET_SIZE = 7;
	
	/**
	 * Default constructor
	 */
	public FavSetHandler() {
		m_favouriteList = new int[7];
	}
	
	/**
	 * 
	 * @param newSet
	 * @throws InvalidFavSetFormatException 
	 */
	public void addFavSet(int[] newSet) throws InvalidFavSetFormatException {
		if (newSet.length != SET_SIZE) {
			// Can't do anything of the size of the set is not what we expect
			throw new InvalidFavSetFormatException();
		} else {
			m_favouriteList = newSet;
		}
	}
	
	/**
	 * 
	 */
	public void removeFavSet() {
		m_favouriteList = null;
	}
	
}
